pub extern crate xloop_types;

#[cfg(target_os = "macos")]
pub extern crate xloop_macos as xloop_impl;

#[cfg(target_os = "ios")]
pub extern crate xloop_ios as xloop_impl;

#[cfg(target_os = "android")]
pub extern crate xloop_android as xloop_impl;

#[cfg(target_family = "windows")]
pub extern crate xloop_windows as xloop_impl;

#[cfg(target_arch = "wasm32")]
pub extern crate xloop_wasm as xloop_impl;

pub mod prelude {
	pub use super::xloop_types;
	pub use super::xloop_types::prelude::*;

	#[allow(unused_imports)]
	pub use super::xloop_impl::prelude::*;

	pub use super::xloop_impl::Application;
	pub use super::xloop_impl::Window;

	pub type AppRef<'a> = <Application as xloop_types::App>::Ref<'a>;
	pub type AppError = <Application as xloop_types::App>::Error;
	pub type AppResult<T> = Result<T, AppError>;

	pub type WinRaw = <Window as xloop_types::Win>::WinRaw;
	pub type WinRef<'a> = <Window as xloop_types::Win>::WinRef<'a>;
	pub type WinHandle = <Window as xloop_types::Win>::WinHandle;
	pub type WinAttr = <Window as xloop_types::Win>::Attr;
	pub type WinError = <Window as xloop_types::Win>::Error;
	pub type WinResult<T> = Result<T, WinError>;
	pub type EvtMouse<'a> = <Window as xloop_types::Win>::Mouse<'a>;
	pub type EvtWheel<'a> = <Window as xloop_types::Win>::Wheel<'a>;
	pub type EvtKey<'a> = <Window as xloop_types::Win>::Keyboard<'a>;
	pub type EvtTouch<'a> = <Window as xloop_types::Win>::Touch<'a>;
	pub type EvtIme<'a> = <Window as xloop_types::Win>::Ime<'a>;
}
